package com.qpf.mycms.component.swagger.properties;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@Data
@ConfigurationProperties(prefix = "mycms.swagger")
public class SwaggerProperties {
    private Boolean enable;
    private Info info;
    private List<Server> servers;

    @Data
    @ToString
    public static class Server {
        private String url;
        private String desc;
    }
    @Data
    @ToString
    public static class License {
        private String name;
        private String url;
        private String identifier;
    }

    @Data
    @ToString
    public static class Contact {
        private String name;
        private String url;
        private String email;
    }

    @Data
    @ToString
    public static class Info {
        private String title;      // Api接口文档标题（必填）
        private String description;     // Api接口文档描述
        private String version;                                  // Api接口版本
        private String termsOfService;    // Api接口的服务条款地址
        private License license;
        private Contact contact;
    }
}
